Text Compare
Developer & Author —Egor VolchenkoText Compare highlights differences between two pasted versions of text as added, deleted, and unchanged lines. Use the text diff checker to review configuration edits, copy revisions, or short code samples, with controls for line-edge whitespace and letter case.
Visual Diff Output
How to use Text Compare
Start with a known test sample so you can check the result against the expected behavior.
Review changes between two texts
- Enter the earlier version in Original Text / JSON and the revised version in Modified Text / JSON. Keep line breaks where you want separate comparisons.
- Turn on Ignore whitespace to trim line edges. Keep Case sensitive on to treat letter-case changes as differences, or turn it off to compare lowercase versions.
- Visual Diff Output updates while you type. Click Compare Differences when needed, then review green additions, red deletions, and the unchanged count.
- Use Swap Sides to reverse which version counts as original. Use Clear where shown or the field clear controls to remove text.
Original text with lines alpha and beta, compared with alpha and gamma, produces one unchanged line, one deletion, and one addition.
Read a line diff rather than a word edit
The output is one combined diff with plus and minus markers. It compares complete lines and counts a replacement as a deletion plus an addition. It does not highlight the exact changed word or character within a line, even if the two input fields sit side by side.
Know what the normalization options remove
Ignore whitespace trims only the beginning and end of each line; internal spaces and empty lines remain part of the comparison. Turning Case sensitive off lowercases the compared text and the displayed diff. Keep the input fields as your reference when original capitalization matters.
Frequently asked questions
It compares lines. A changed word can make the whole old line appear as a deletion and the revised line as an addition. There is no word-level or character-level mode selector.
API — Text Diff Checker
Automate this tool directly from your scripts, CI/CD pipelines, or backend applications via HTTP POST.
https://million.tools/api/v1/run/text-compare Request Parameters (JSON / Form Data)
-
ignore_whitespaceIgnore whitespace
-
case_sensitiveCase sensitive
-
start(orinput)Original Text / JSON
-
diff_targetModified Text / JSON
curl -X POST https://million.tools/api/v1/run/text-compare \
-H "Content-Type: application/json" \
-d '{"start":"# Deployment Config (v1.4)\nAPP_ENV=staging\nAPI_HOST=api-staging.million.tools\nCACHE_TTL=300\nDEBUG_MODE=true\nRATE_LIMIT=100\nFEATURE_EXPORT=enabled","diff_target":"# Deployment Config (v1.5)\nAPP_ENV=production\nAPI_HOST=api.million.tools\nCACHE_TTL=300\nRATE_LIMIT=100\nFEATURE_EXPORT=enabled\nFEATURE_WEBHOOKS=enabled\nLOG_LEVEL=warn"}' const response = await fetch('https://million.tools/api/v1/run/text-compare', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
"start": "# Deployment Config (v1.4)\nAPP_ENV=staging\nAPI_HOST=api-staging.million.tools\nCACHE_TTL=300\nDEBUG_MODE=true\nRATE_LIMIT=100\nFEATURE_EXPORT=enabled",
"diff_target": "# Deployment Config (v1.5)\nAPP_ENV=production\nAPI_HOST=api.million.tools\nCACHE_TTL=300\nRATE_LIMIT=100\nFEATURE_EXPORT=enabled\nFEATURE_WEBHOOKS=enabled\nLOG_LEVEL=warn"
}),
});
const data = await response.json();
console.log(data.result); import requests
response = requests.post(
'https://million.tools/api/v1/run/text-compare',
json={
"start": "# Deployment Config (v1.4)\nAPP_ENV=staging\nAPI_HOST=api-staging.million.tools\nCACHE_TTL=300\nDEBUG_MODE=true\nRATE_LIMIT=100\nFEATURE_EXPORT=enabled",
"diff_target": "# Deployment Config (v1.5)\nAPP_ENV=production\nAPI_HOST=api.million.tools\nCACHE_TTL=300\nRATE_LIMIT=100\nFEATURE_EXPORT=enabled\nFEATURE_WEBHOOKS=enabled\nLOG_LEVEL=warn",
},
timeout=15,
)
data = response.json()
print(data['result']) $ch = curl_init('https://million.tools/api/v1/run/text-compare');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode([
'start' => '# Deployment Config (v1.4)\nAPP_ENV=staging\nAPI_HOST=api-staging.million.tools\nCACHE_TTL=300\nDEBUG_MODE=true\nRATE_LIMIT=100\nFEATURE_EXPORT=enabled',
'diff_target' => '# Deployment Config (v1.5)\nAPP_ENV=production\nAPI_HOST=api.million.tools\nCACHE_TTL=300\nRATE_LIMIT=100\nFEATURE_EXPORT=enabled\nFEATURE_WEBHOOKS=enabled\nLOG_LEVEL=warn',
]),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
echo $response['result'] ?? ''; {
"status": "success",
"tool": "text-compare",
"service": "text_compare",
"result": "{\n \"equal\": false,\n \"additions\": 5,\n \"deletions\": 4,\n \"unchanged\": 3,\n \"diff\": [\n {\n \"type\": \"del\",\n \"text\": \"# Deployment Config (v1.4)\"\n },\n {\n \"type\": \"del\",\n \"text\": \"APP_ENV=staging\"\n },\n {\n \"type\": \"del\",\n \"text\": \"API_HOST=api-staging.million.tools\"\n },\n {\n \"type\": \"add\",\n \"text\": \"# Deployment Config (v1.5)\"\n },\n {\n \"type\": \"add\",\n \"text\": \"APP_ENV=production\"\n },\n {\n \"type\": \"add\",\n \"text\": \"API_HOST=api.million.tools\"\n },\n {\n \"type\": \"same\",\n \"text\": \"CACHE_TTL=300\"\n },\n {\n \"type\": \"del\",\n \"text\": \"DEBUG_MODE=true\"\n },\n {\n \"type\": \"same\",\n \"text\": \"RATE_LIMIT=100\"\n },\n {\n \"type\": \"same\",\n \"text\": \"FEATURE_EXPORT=enabled\"\n },\n {\n \"type\": \"add\",\n \"text\": \"FEATURE_WEBHOOKS=enabled\"\n },\n {\n \"type\": \"add\",\n \"text\": \"LOG_LEVEL=warn\"\n }\n ]\n}",
"results": {
"result": "{\n \"equal\": false,\n \"additions\": 5,\n \"deletions\": 4,\n \"unchanged\": 3,\n \"diff\": [\n {\n \"type\": \"del\",\n \"text\": \"# Deployment Config (v1.4)\"\n },\n {\n \"type\": \"del\",\n \"text\": \"APP_ENV=staging\"\n },\n {\n \"type\": \"del\",\n \"text\": \"API_HOST=api-staging.million.tools\"\n },\n {\n \"type\": \"add\",\n \"text\": \"# Deployment Config (v1.5)\"\n },\n {\n \"type\": \"add\",\n \"text\": \"APP_ENV=production\"\n },\n {\n \"type\": \"add\",\n \"text\": \"API_HOST=api.million.tools\"\n },\n {\n \"type\": \"same\",\n \"text\": \"CACHE_TTL=300\"\n },\n {\n \"type\": \"del\",\n \"text\": \"DEBUG_MODE=true\"\n },\n {\n \"type\": \"same\",\n \"text\": \"RATE_LIMIT=100\"\n },\n {\n \"type\": \"same\",\n \"text\": \"FEATURE_EXPORT=enabled\"\n },\n {\n \"type\": \"add\",\n \"text\": \"FEATURE_WEBHOOKS=enabled\"\n },\n {\n \"type\": \"add\",\n \"text\": \"LOG_LEVEL=warn\"\n }\n ]\n}"
}
}
Hi! I’m a WordPress developer with over 10 years of experience. I love Tailwind CSS, clean code, and intuitive interfaces. I’m currently working on million.tools — a service with convenient online tools for everyday tasks. I’m building it from scratch with great attention to detail and user experience.
Ratings & feedback 0
Share your experience with this tool.
No feedback yet
Be the first to leave a review or rating.