JSON Formatter
Beautifies or minifies JSON.
Compare two versions of code or text and see exactly what changed. Added and removed lines are highlighted side by side or in a single unified view.
The checker finds the longest common subsequence of the two inputs with the Myers diff algorithm, the same approach Git uses. Whatever isn't in the common part is either a removal from the original or an addition in the changed text.
A and a as the same.---, +++, and @@ hunk headers with 3 lines of context, so git apply and patch can read it.Original:
host: localhost port: 8080 debug: true
Changed:
host: localhost port: 9090 debug: false cache: redis
Result by lines: 2 lines removed, 3 lines added, 1 line unchanged. The unified diff is:
@@ -1,3 +1,4 @@ host: localhost -port: 8080 -debug: true +port: 9090 +debug: false +cache: redis
No. Both texts are compared in your browser, and nothing is sent to a server.
A text format that lists removed lines with -, added lines with +, and a few unchanged lines around them for context. Git, GitHub, and the patch command all use it.
Yes. Format both first with the JSON Formatter, ideally with sorted keys, so that differences in spacing or key order don't hide the real changes.
Line mode compares whole lines. The changed words inside the line are highlighted more strongly, or you can switch Compare by to characters.
Often used together with the Diff Checker.
Beautifies or minifies JSON.
Highlights regex matches live, lists capture groups and offsets, and previews replacements.
Beautifies minified or messy JavaScript with your chosen indent and brace style.