Part of the PowerToys suite of tools for Windows

Text Expander

Type a short trigger and get the full text, in any app.

Three apps side by side. In an email, !mysig has turned into a signature. In a chat with Elaine, !omw has turned into “On my way”. In a web form, !myaddr has turned into a street address.

How it works

  1. Turn it on

    Open PowerToys Settings, select Text Expander and turn on Enable Text Expander.

  2. Add a snippet

    Select New snippet, then give it a trigger, such as !mysig, and the text it should turn into. You can also start from an example.

  3. Type the trigger

    In email, chat, your browser or any other app, Text Expander swaps the trigger for your text as you type.

Make it yours

Short or long

A word, an address or a whole email. Text Expander types short snippets, pastes longer ones and then puts your clipboard back.

Fill in the details

Add the date or time in the format you like, what’s on your clipboard, or something Text Expander asks you each time the snippet runs.

Put the cursor where you need it

Mark a spot with $|$ and the cursor lands there after the snippet expands, ready for you to keep typing.

Undo in one step

Didn’t mean to expand it? Press Ctrl+Z straight away to get back what you typed.

Sync across PCs

Keep the same snippets on every PC with OneDrive, or keep them in a folder from another sync app.

Just a text file

Your snippets live in one plain text file that you can edit in Settings or in any text editor. Changes apply as soon as you save.

Write your first snippet

The easiest way is New snippet in Settings. You can also edit the snippet file in any text editor. Write one snippet per line, as trigger=replacement. For text with several lines, put trigger<<< on the line before it and >>> on the line after it.

!myemail=you@example.com
!mysig=Best regards,\nYour Name
!today={{date:dddd, MMMM d}}
!reply<<<
Hi {{prompt:Name}},

Thanks for getting in touch. $|$

Best regards,
Your Name
>>>

Start triggers with a symbol such as ! so they don’t fire in the middle of a word. In a one-line snippet, \n starts a new line and \t adds a tab.

Variables

Add these anywhere in a snippet. In Settings, Insert variable adds them for you, and the preview shows what the snippet will type. Each one below shows a snippet in action.

Frequently asked questions

Where are my snippets saved?

In a plain text file called PowerToysTextExpanderSnippets.txt. Unless you sync it, it’s in %LOCALAPPDATA%\Microsoft\PowerToys\TextExpander. Text Expander reloads it whenever you save, so there’s nothing to restart.

Can I use the same snippets on all my PCs?

Yes. In Text Expander settings, turn on Sync across PCs to keep your snippets in OneDrive. Using another sync app? Choose its folder instead.

Does it work in every app?

In most apps. Snippets don’t expand in apps running as administrator or in standard Windows password boxes. They can still expand in password fields on websites and in some apps.

What if an app doesn’t accept the text?

Some apps block pasting. In Text Expander settings, under Advanced, set Insertion method to Always type.

Why does my trigger fire in the middle of a word?

Start your triggers with a symbol such as !, or turn on Wait for the whole word under Advanced. Text Expander then waits for a space or punctuation before it expands, and leaves the space or punctuation in place.

Can I undo an expansion?

Yes. Right after a snippet expands, press Ctrl+Z to change it back to what you typed. This doesn’t work for snippets that use your clipboard or ask you to type something.

Does Text Expander need administrator rights?

No. It runs as you. To edit snippets, PowerToys needs to run without administrator rights.

Can my organization turn it off?

Yes. Administrators can turn off Text Expander with group policy, using the ConfigureEnabledUtilityTextExpander policy ID. Learn more in the PowerToys group policy documentation.