- Home
-
Left-align Text
Left-align Text
Remove leading whitespace or smart-dedent your text instantly.
Strict Alignment
Instantly remove all leading whitespace from every line, perfect for cleaning up messy lists.
Smart Dedent
Remove common indentation while preserving relative structure, ideal for code snippets.
Instant Processing
Everything happens in your browser instantly. No server uploads, total privacy.
Ultimate Guide: Left-align Text & Dedentation
Left-aligning text is a common formatting task, especially when dealing with code snippets, poetry, or lists copied from various sources. Our Left-align Text Tool provides two powerful modes to handle different scenarios:
Strict Left Align vs. Smart Dedent
- Strict Left Align: This mode aggressively removes all leading whitespace (spaces and tabs) from every single line. It's perfect for flattening lists or fixing text that has erratic indentation.
- Smart Dedent: This mode is more intelligent. It scans your entire text to find the "common indentation" (the minimum whitespace shared by all non-empty lines) and removes only that amount. This preserves the relative indentation of nested lines, making it essential for formatting code blocks or structured text.
Why Use This Tool?
Manually removing indentation line by line is tedious and error-prone. This tool automates the process with:
- Zero-Upload Privacy: All processing happens in your browser via JavaScript. Your data never leaves your device.
- Drag & Drop: Easily process .txt, .md, .js, .py, or any text-based file.
- Cross-Platform: Works perfectly on Windows, Mac, Linux, iOS, and Android.