Skip to content

Insert Text

Insert text at a position, every N characters, or around a match.

Quick Tool Overview

Insert Text adds text at a character position, at a fixed interval, or before and after every match of a word. The interval mode is what formats card numbers, MAC addresses and licence keys; the wrap mode tags every instance of a term through a document.

What it does
Inserts text at a position, an interval or around matches
You give it
A value to format or a document to annotate
You get back
The text with your insertions made
Best for
Formatting keys and numbers, and tagging terms
Text Tools Free, unlimited use No sign-up Runs in your browser

About the Insert Text

Inserting text at a regular interval is the job behind a surprising number of small tasks: putting a space every four digits of a card number, a colon every two characters of a MAC address, a hyphen every five characters of a licence key, or a line break every eighty characters of a long string.

This inserts at whatever point you specify. By character position for a single insertion, at a fixed interval for formatting, or before and after every occurrence of a word — which is how you wrap a term in asterisks throughout a document, or tag every instance of a name. Insertion runs line by line or across the whole text, and the count of insertions made is reported so you can confirm it hit what you expected.

Key features of the Insert Text

Fixed-interval insertion

A space every four digits, a colon every two characters — the formatting rules that come up constantly.

Wrap every match

Different text before and after each occurrence of a word, for bolding or tagging a term throughout.

Ignore existing whitespace

Count only the real characters, so a partly formatted value reformats consistently.

Per-line or whole-text

Apply the rule to each row independently, or to the document as one continuous string.

Insertion count reported

How many insertions were made, so you can confirm the rule matched what you intended.

How to use the Insert Text

  1. 1

    Paste your text

    A value to format, or a document to annotate.

  2. 2

    Choose where to insert

    At a character position, at a regular interval, or around every match of a word.

  3. 3

    Enter what to insert

    The text to insert, and a second piece if you are wrapping matches.

  4. 4

    Check the count

    The number of insertions made is shown, so you can confirm the rule matched what you meant.

Frequently asked questions

Insert a space at an interval of four characters. A sixteen-digit number becomes four groups of four, which is how card numbers are printed and how most forms expect them.

Reviews of the Insert Text

What people who use the Insert Text think of it. Reviews come from visitors and are posted as written.

No ratings yet

Yours would be the first.

  • 5 0 reviews rated 5 stars
  • 4 0 reviews rated 4 stars
  • 3 0 reviews rated 3 stars
  • 2 0 reviews rated 2 stars
  • 1 0 reviews rated 1 star

Write a review

Used this tool? Your rating helps the next person decide.

Your rating

Plain text only — links, email addresses and HTML are not accepted. Your name and review are shown publicly; nothing else is collected. See the privacy policy.

0 reviews

Newest first

No reviews yet

Be the first to rate the Insert Text. It takes half a minute and no account.

Write the first review

More text tools