All Over Tools logo
Tool Combiner
Analyze Tools Clean Tools Compare Tools Convert Tools Data Validation Extract Tools Format Tools Generate Tools Organize Tools Transform Tools
Image Tools Video Tools Audio Tools Subtitle Tools Font Tools
Analyze Tools Clean Tools Compress Tools Convert Tools Edit Tools Extract Tools Generate Tools Merge Tools Organize Tools Redact Tools Repair Tools Split Tools
Analyze Tools Clean Tools Compare Tools Convert Tools Extract Tools Generate Tools Merge Tools Transform Tools Validate Tools
Business Calculators Construction Calculators Date And Time Calculators Education Calculators Financial Calculators Food Calculators Health Calculators Math Calculators Science Calculators Sports Calculators Statistics Calculators
Blog About Us Contact Us

Text Formatter

A canonical formatting workspace: number lines, add prefixes and suffixes, and manage indentation as a reusable, reorderable action pipeline.

Formatting actions

No actions yet. Add one above to start building your pipeline.

Formatted output

Use Formatting Actions to transform text

Paste text into the input editor or use its Upload button to choose a text file. Add an action under Formatting Actions with Add Action. The output updates automatically; with no actions, it matches the input. The output textarea is read-only.

Build and reorder the action pipeline

Use several actions when the text needs more than one line-based change. Actions run from top to bottom, so the order changes the result.

  1. Choose Line Numbers, Prefix, Suffix, Indentation, or Prefix & Suffix (Bulk).
  2. Click Add Action and set the fields on the new action.
  3. Use Move up or Move down to change an action's position, or use Remove to delete it.
  4. Click Clear all to remove the current actions.

There is no separate Apply control. Changes to the input and action controls are processed automatically.

Configure line numbers, prefixes, suffixes, and indentation

  • Line Numbers: Set Start at, Zero-pad width (0 = off), and Separator. This action numbers every split line, including blank lines.
  • Prefix: Enter Prefix text. When Skip empty lines is enabled, empty and whitespace-only lines stay unchanged.
  • Suffix: Enter Suffix text and choose whether to skip empty or whitespace-only lines.
  • Indentation: Choose Add indent or Remove indent, select Spaces or Tabs, and set Size.

Use Prefix & Suffix (Bulk) for filtered line changes

Add Prefix & Suffix (Bulk) when one action needs to handle several line conditions. Enter Prefix and Suffix, then choose any relevant options:

  • Skip empty lines, Skip whitespace-only lines, and Skip duplicate lines.
  • Trim lines before applying removes surrounding whitespace before the prefix and suffix are added. If duplicate skipping is enabled, the trimmed value is also used for duplicate detection.
  • Add line number as prefix, with Line number format set to 1. line, 1) line, or [1] line.
  • Only apply to lines, followed by a Filter type and Filter pattern. The filter can match text that is containing, starting with, ending with, or matching regex.

When Skip duplicate lines is enabled, the first occurrence remains and later exact duplicates are omitted.

Save, load, and remove presets

  1. Build and configure the action pipeline, then click Save preset.
  2. Enter a name at the Preset name: prompt.
  3. Select the saved setup from Load preset... and click Load to apply it to the current input.
  4. Select a preset and click the trash button to remove it.

Presets are stored in the browser's localStorage. Saving a preset does not apply it automatically.

Copy or download the formatted result

The output is read-only. Use Copy to place the result on the clipboard or Download to save it.

Important behavior and limitations

  • The tool splits input into lines for processing and joins the output with LF (\n) line endings.
  • With no actions, the output matches the input. The output textarea cannot be edited.
  • Skip duplicate lines in Prefix & Suffix (Bulk) keeps the first occurrence and omits later exact duplicates. Trimming changes the value used for comparison.
  • An invalid regular expression in the bulk filter is caught and effectively allows that line through.
  • Remove indent removes up to the configured number of leading spaces or tabs. With Size set to 0, it still removes one leading character of the selected unit.
  • Sorting, shuffling, and reversing lines are not implemented actions.
  • File upload and drag-and-drop read the selected file as text.

Frequently Asked Questions (FAQs)

How do I add line numbers to text?

Add a Line Numbers action, set Start at, Zero-pad width (0 = off), and Separator, then enter your text. The output updates automatically and every line in the input is numbered.

Can I combine line numbers with a prefix and indentation?

Yes. Add multiple actions and reorder them as needed. Each action runs in sequence on the output of the previous one, and the output updates automatically.

Can I save and reuse a formatting setup?

Yes. Click Save preset, enter a name at the Preset name: prompt, then select it from Load preset... and click Load. Presets are stored in the browser's localStorage.

Related Tools

3 views