Text to left-align

Left-aligned text

How does it work?

This tool left-aligns text by removing all leading whitespace (spaces, tabs) from each line. This ensures that each line starts at the leftmost position without any indentation.

The process works as follows:

  • The text is split into individual lines
  • For each line, all leading whitespace characters are removed
  • The lines are joined back together, preserving line breaks

Example

Original text (with leading spaces)

    Title
        Subtitle
   This is a line with some leading spaces
          Short line
     Another line with leading whitespace
  The End

After left alignment

Title
Subtitle
This is a line with some leading spaces
Short line
Another line with leading whitespace
The End

Parameters

  • Text to left-align: The input text with leading whitespace that you want to left-align

This tool is useful for:

  • Cleaning up text copied from sources with inconsistent indentation
  • Removing unwanted indentation from code snippets
  • Standardizing text formatting in documents
  • Preparing text for further processing or formatting
  • Fixing alignment issues in plain text files

Note: This tool only removes leading whitespace. It does not affect whitespace between words or at the end of lines.

Related Tools

All Tools

See all available tools