Source map Base64 VLQ
Convert signed source-map integers to and from Base64 VLQ tokens. Unlike byte Base64, this uses variable-length integer groups and a sign convention.
The example value has been entered. Check it immediately or change the value.
Input is processed in the browser. Refreshing returns a sample value.
Instructions and example
Encode combined sign and magnitude from low groups upward, using continuation bits to indicate another group.
Integers 0, 1, -1 and 16 encode as A, C, D and gB respectively.
Signed 32-bit integers and up to 100 values. Complete mappings structures and cumulative deltas are not processed.
Frequently asked questions
Is source-map VLQ the same as ordinary Base64?
It shares the alphabet but uses a different integer sign and continuation-bit format.
How is minimum value -2147483648 represented?
It encodes as B under the ECMA-426 special sign rule.
Calculation criteria and reference materials
- ECMA-426 — Base64 VLQ
Encode combined sign and magnitude from low groups upward, using continuation bits to indicate another group.
Verification of calculation criteria: · Calculation·verification principles · Report errors