Skip to content

JSON Formatter and Validator

Check that JSON is valid, see where the error is, and pretty-print, minify or sort its keys. Paste it or add files.

Drop files here or click to choose Files never leave your device
    Options

    How to use JSON Formatter and Validator

    1. Paste JSON in the box or add .json files.
    2. Choose the format: 2 spaces, 4 spaces, tabs or minified, and whether to sort keys.
    3. Press Start: invalid JSON is reported with its line and column.
    4. Copy the result or download the .json file.

    How JSON Formatter and Validator works

    Validation with the exact place

    The JSON is parsed by your browser. If it is not valid, a small checker finds where it breaks and tells you the line and column, for example a missing quote or a comma before a closing bracket.

    Pretty-print or minify

    Pretty-printing adds line breaks and indentation to make JSON readable; minifying removes all spaces to make it as small as possible for APIs and config files.

    Sorted keys

    Sorting puts object keys in alphabetical order at every level, which makes two JSON files easy to compare.

    Comparison

    This site (in-browser)Typical upload-based sites
    Your filesNever leave your deviceSent to a remote server
    Waiting timeNo upload, no download queueUpload + processing + download
    LimitsNoneOften file-size or daily limits
    Works offlineYes, once loadedNo

    Tips for the best result

    • Trailing commas and single quotes are not allowed in JSON: they are the most common errors.
    • Use minified JSON in production, pretty JSON when you read or review it.
    • Sort keys before comparing two configurations.
    • To convert to YAML, XML or TOML, use JSON to YAML.

    Private by design

    JSON Formatter and Validator runs entirely inside your browser, in background threads (Web Workers) that use your device's own processor. Your files are never uploaded to our servers, so nobody else can see them, and processing starts instantly with no upload or download wait. Once the page has loaded, the tool keeps working even without an internet connection.

    Related tools

    Frequently asked questions

    Why does it say my JSON is invalid?

    JSON is strict: keys and strings need double quotes, no trailing commas, no comments. The line and column point to the first problem.

    Is the order of arrays changed when sorting?

    No, only object keys are sorted; arrays keep their order.

    Are large numbers kept exactly?

    Numbers beyond about 15 digits lose precision in JavaScript. Keep big IDs as strings.

    Can I format several files?

    Yes, add several files: each gets its own result.

    Is my data uploaded?

    No. Files and pasted text are processed by JavaScript in your browser and never sent to FileToolsPlus or any server, so you can use it for private configuration files, API keys or customer data.

    Does it work offline?

    Once the page has loaded, the conversion itself needs no internet connection.