Text diff checker online
Browser side-by-side text and code diff checker
Paste the original on the left and the modified file on the right. The comparison, in-line highlights, and the unified patch stay on this device.
The workbench needs JavaScript in this browser. Without it, you can still read the patch guide and examples, but live comparison, copy, and download will not run.
{
"service": "checkout-api",
"version": "1.4.0",
"rateLimit": {
"windowSeconds": 60,
"maxRequests": 120
},
"featureFlags": {
"newCheckout": false,
"legacyCart": true,
"auditLog": true
},
"cors": {
"origins": [
"shop.example.com",
"admin.example.com"
],
"allowCredentials": true
}
}
{
"service": "checkout-api",
"version": "1.5.0",
"rateLimit": {
"windowSeconds": 60,
"maxRequests": 200
},
"featureFlags": {
"newCheckout": true,
"legacyCart": false,
"auditLog": true,
"expressPay": true
},
"cors": {
"origins": [
"shop.example.com",
"admin.example.com",
"preview.example.com"
],
"allowCredentials": true
}
}
upstream shop_app {
server 127.0.0.1:8080;
}
server {
listen 80;
server_name shop.example.com;
root /var/www/shop;
index index.html;
location / {
proxy_pass shop_app;
proxy_set_header Host $host;
proxy_read_timeout 30s;
}
location /assets/ {
expires 1h;
add_header Cache-Control "public";
}
}
upstream shop_app {
server 127.0.0.1:8080;
}
server {
listen 443 ssl http2;
server_name shop.example.com;
root /var/www/shop;
index index.html;
gzip on;
gzip_types text/css application/javascript application/json;
location / {
proxy_pass shop_app;
proxy_set_header Host $host;
proxy_read_timeout 90s;
proxy_http_version 1.1;
}
location /assets/ {
expires 30d;
add_header Cache-Control "public, immutable";
add_header X-Content-Type-Options nosniff;
}
}
SELECT o.id, o.created_at, c.email, SUM(i.qty * i.unit_price) AS total FROM orders o INNER JOIN customers c ON c.id = o.customer_id INNER JOIN order_items i ON i.order_id = o.id WHERE o.created_at >= '2024-01-01' AND o.status <> 'cancelled' GROUP BY o.id, o.created_at, c.email ORDER BY o.created_at DESC;
CREATE INDEX idx_orders_created_status
ON orders (created_at, status);
SELECT
o.id,
o.created_at,
c.email,
SUM(i.qty * i.unit_price) AS total
FROM orders o
LEFT JOIN customers c ON c.id = o.customer_id
INNER JOIN order_items i ON i.order_id = o.id
WHERE o.created_at >= '2025-01-01'
AND o.status IN ('paid', 'shipped')
GROUP BY o.id, o.created_at, c.email
ORDER BY o.created_at DESC;
# Release notes
## 1.2.0
- Format and minify a query in the browser.
- Add a --watch flag for local previews.
- Document the default port in the README.
Usage:
desk format --file query.sql
# Release notes
## 1.3.0
- Format and minify a query in the browser.
- Add a --dry-run flag before writing a file.
- Add a --watch flag for local previews.
- Document the default port and locale prefix in the README.
Usage:
desk format --file query.sql --dry-run
Questions
Do I need an account?
No. The checker runs in this browser. There is no file to upload and no sign-in.
Does the comparison ever leave this device?
No. Line comparison, in-line highlights, copy, and the .patch or .diff download all stay in this page. Nothing is posted to a server.
What do Ignore whitespace and Ignore case do?
Ignore whitespace treats leading, trailing, and collapsed internal spaces as equal when lines are compared. Ignore case compares letters without regard to capitalisation. The displayed text stays as you typed it.
What is in the downloaded patch?
A GNU unified diff with --- / +++ file headers, @@ hunk ranges, three lines of context, and + / - / space markers. The same text is used for .patch and .diff; only the filename changes.
Related desks and references
These are other jmforu.com desks and an official note on the unified format this page writes. A link here is not a claim that a destination was probed from this build.
- JM Hub — A catalog of the jmforu.com tool set.
- JM SQL Format — A sibling browser desk that formats and inspects SQL without an upload.
- JM Cron Helper — A sibling desk that builds and explains cron expressions in the browser.
- JM Timezone Meet — A sibling desk that finds overlapping meeting hours across time zones.
- JM JWT Decode — A sibling browser desk that inspects JWT claims locally, without posting a token.
- GNU unified diff format — Official Diffutils notes for the unified format this desk writes (`---`, `+++`, and `@@` hunk headers).