Skip to content
UniKit

JSON Numbers to Strings

Turn every numeric value in JSON into a string while keeping the original literal (1.50 stays "1.50"), so large integers such as snowflake IDs lose no precision. Parsing stays in your browser.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

JSON input

Every numeric value becomes a string while keeping its literal form (1.50 stays "1.50"), so large integers such as snowflake IDs do not lose precision.

Converted JSON

Only numeric values change; strings, booleans, null and key names stay as-is, and digits inside strings are untouched.

Paste JSON to see the converted result

What this tool does

  • Turn snowflake IDs and order numbers into strings before JavaScript or Excel rounds them
  • Normalise numeric fields to strings when preparing sample data or a JSON Schema

Example

Input

{"id":12345678901234567890,"age":37}

Output

{
  "id": "12345678901234567890",
  "age": "37"
}

Numbers keep their literal form, so the 20-digit integer survives intact.

Frequently asked questions

Do large integers really keep full precision?

Yes: numeric literals are quoted before parsing, so they never pass through a double. 12345678901234567890 becomes the exact same string. Values already rounded in the source data cannot be recovered.

Does 1.50 become "1.5"?

No. The original literal is preserved, so 1.50 yields "1.50" and 1e3 yields "1e3"; no numeric normalisation happens.

Are digits inside strings converted?

No. The scanner skips string contents (including escaped quotes); only real numeric literals are converted and counted.

Is JSON5 or commented JSON supported?

No. The rewritten text is still validated with standard JSON.parse, so leading-zero numbers like 01, trailing commas and comments all raise an error.

Keywords:json numbers to stringsjson bigint safe

Related tools