Guides/Create content/Text/Preformatted Block

Preformatted Block

Last reviewed on November 26, 2025

If you wish to add text to a post or page that is displayed exactly as you type it, the preformatted block is for you. You can create one by clicking the +Block Inserter icon.

The Preformatted Block shows text in monospace font with specific spacing.

You can also type /preformatted and hit the enter key in an empty paragraph block to quickly create one.

For more information, visit our detailed instructions on adding blocks.

Usage

The preformatted block shares a lot of similarities with the paragraph block and the code block. Think of it as a hybrid of the two.

Like the paragraph block, the preformatted block is intended primarily to display text. Unlike the paragraph block, though, the preformatted block keeps any spacing or line breaks exactly as they are entered.

Similar to the code block, the preformatted block is displayed in a monospace font, making it easy to keep text perfectly aligned. However, the preformatted block also includes styling and the ability to add hyperlinks (described below) that a code block doesn’t have.

Block toolbar

When you click on the block, a toolbar of options will appear above it:

Preformatted block toolbar options.
The Preformatted block toolbar has basic text formatting options.

The Preformatted block has the following options in its toolbar:

Block settings

When you select a block, you will find additional block settings in the right sidebar. If you do not see the sidebar, you may need to click the Settings icon in the top-right corner to bring up the settings. This icon looks like a square with two uneven columns:

An arrow pointing to the "Settings" icon in the top right of the WordPress Editor.
Click the Settings icon to open the block settings

The Block Settings include the following:

Was this guide helpful for you?

Not quite what you're looking for? Get Help!

Copied to clipboard!