Start a project

Tool 247 of 425 · JSON

JSON5 & JSONC to JSON

Turns relaxed JSON5 or JSONC into valid strict JSON that any parser accepts.

JSON5 & JSONC to JSON

Your input

Result

JSON

    01

    What it does

    Turns relaxed JSON5 or JSONC into valid strict JSON that any parser accepts.

    • Removes // and /* */ comments
    • Trailing commas
    • Unquoted keys and single-quoted strings
    • Hex numbers, Infinity and NaN flagged

    02

    Private by design

    Everything happens in your browser. Nothing you type, paste or upload is sent anywhere, and it keeps working offline once the page has loaded.

    03

    What you get

    Strict JSON, with a Copy and a Download button on every result.

    • JSON5
    • JSONC
    • tsconfig

    Why it matters

    tsconfig.json, VS Code settings and many configs allow comments and trailing commas, but JSON.parse, jq and APIs don't.

    Convert once and the file works everywhere.

    How to use it

    1. Type or paste your input; the example shows the format.
    2. Press Convert. Results also update as you type.
    3. Read the summary line, then the table, notes or output below it.
    4. Copy or download what you need. Nothing leaves this page.

    FAQ

    What happens to NaN and Infinity?

    Strict JSON can't hold them, so they become null and you get a note.

    Is it a full JSON5 parser?

    It covers the features used in real configs; exotic escapes may need a check.

    Is my input uploaded?

    No. The tool runs in your browser and nothing you type, paste or open is sent anywhere.

    Can I rely on the result?

    It follows the public specification or formula named on this page and says where it simplifies. Check anything critical against the official tool or documentation before you ship it.

    Work with me

    Want a site that gets these right?

    I build fast, accessible websites and web apps that pass these checks from day one. Tell me about your project and I'll reply personally with honest next steps.

    All developer tools · Back to leej.uk