Setup & site building · Guide
How to Justify Paragraph in WordPress (Step by Step)

Short answer
The block editor has no justify button, so add a class such as text-justify under Advanced in the paragraph settings and a CSS rule that sets text-align to justify. You can also use a justify plugin, or press Shift+Alt+J in the classic editor.
Key takeaways
- The core Paragraph block offers left, center and right alignment, not justify.
- An Additional CSS class plus one CSS rule is the cleanest way to justify text.
- A scoped CSS rule can justify every paragraph in your post content.
- The classic editor still supports the Shift+Alt+J shortcut.
- Justified text can hurt readability on phones, so consider desktop-only rules and hyphenation.
Can you justify a paragraph in the WordPress block editor?
Not with a core button: the Paragraph block's alignment menu offers left, center and right, so you justify text with a CSS class, a small plugin, or the classic editor shortcut.
Justified text stretches each line so both the left and right edges line up, like a newspaper column. WordPress removed the justify button from its toolbar years ago, and the block editor never added it back for paragraphs.
That does not mean you are stuck. You have four reliable ways to do it:
| Method | Best for | Needs code? | Works on |
|---|---|---|---|
| Additional CSS class | One or a few paragraphs | A tiny bit of CSS | Any theme |
| Site-wide CSS rule | Every paragraph on the site | A tiny bit of CSS | Any theme |
| Justify plugin | People who want a toolbar button | No | Block editor |
| Classic editor shortcut | Sites still using the classic editor | No | Classic editor |
Before you start, think about whether justified text is right for your site. We cover the readability trade-offs near the end of this guide.
How do you justify one paragraph with a CSS class?
Add a class such as text-justify to the paragraph under Advanced in the block settings, then add one CSS rule that sets text-align to justify for that class.
This is the cleanest method because it uses only core features and you control exactly which paragraphs change.
Step 1: add the class to the block.
- Open the post or page in the block editor.
- Click the paragraph you want to justify.
- Open the Settings sidebar and select the Block tab.
- Expand the Advanced section at the bottom.
- In Additional CSS class(es), type
text-justify. - Save or update the post.
Step 2: add the CSS rule.
In a block theme, go to Appearance > Editor, open Styles, and use the Additional CSS option in the Styles menu. In a classic theme, go to Appearance > Customize > Additional CSS. Then paste:
.text-justify {
text-align: justify;
}
Publish or save, then view the post. The paragraph should now have straight edges on both sides.
The editor preview may not show the change until you add the CSS, because the class does nothing on its own. The text-align reference on MDN explains every value this property accepts.
If your CSS does not seem to apply, clear any caching plugin and check our guide on CSS changes not showing.
How do you justify every paragraph on your site?
Add a CSS rule that targets paragraphs inside your post content area, so every paragraph in posts and pages is justified without editing them one by one.
Use a rule scoped to the content area so you do not justify menus, footers and buttons by accident:
.entry-content p,
.wp-block-post-content p {
text-align: justify;
}
The first selector covers most classic themes. The second covers block themes that use the Post Content block. Add it the same way as before, in Additional CSS.
If a single paragraph should not be justified, give it its own alignment from the block toolbar. A paragraph set to center in the toolbar gets a class that usually wins over this general rule.
Want to apply it only to blog posts and not pages?
Most themes add a class such as single-post to the body tag on posts. You could write .single-post .entry-content p instead. Check your theme's HTML with your browser's inspect tool to confirm the class name.
How do you justify text with a plugin?
Install a plugin that adds a justify option to the Paragraph block toolbar, such as Justify for Paragraph Block from the WordPress plugin directory.
This is the easiest route if you do not want to touch CSS or if several writers need a simple button.
- Go to Plugins > Add New Plugin.
- Search for justify paragraph.
- Install and activate a well-maintained option, such as Justify for Paragraph Block.
- Open a post, click a paragraph, and use the new justify option in the alignment menu.
Before installing, check the plugin's last update date, active installs and support forum. A small plugin that has not been updated in years may break after a WordPress update. Our guide on finding abandoned WordPress plugins shows what to look for.
Some block collections and page builders also include justify options. If you already use one, check its paragraph or text block before adding another plugin.
How do you justify text in the classic editor?
Select the text and press Shift+Alt+J on Windows or Ctrl+Option+J on a Mac; the classic editor still supports the keyboard shortcut even though the toolbar button is gone.
WordPress 4.7 removed the justify and underline buttons from the classic editor toolbar, but the shortcut kept working.
If the shortcut does nothing, try these checks:
- Make sure you are in the Visual tab, not the Text tab.
- Select whole paragraphs, not just a few words.
- Try the Text tab instead and wrap the paragraph in
<p style="text-align: justify;">and</p>.
The Classic Editor keyboard shortcuts page lists the formatting shortcuts. If you want the classic editor back on your site, read how to go back to the classic editor.
Can you justify text with HTML in the block editor?
Yes, you can edit a paragraph as HTML and add an inline style, but the block editor may flag the block as invalid, so the CSS class method is safer.
To try it, click the paragraph, open the three-dot menu, and choose Edit as HTML. Change <p> to <p style="text-align:justify">.
The block editor checks that block markup matches what it expects. An inline style it did not create can trigger a This block contains unexpected or invalid content warning. If that happens, undo the change and use the class method instead.
A Custom HTML block avoids the validation warning, but then you lose easy editing of that text. It is fine for a one-off, not for regular writing.
Does justify work in Elementor and other page builders?
Most page builders, including Elementor, offer justify as a built-in alignment option in their text widget, so you do not need extra CSS there.
In Elementor, open the Text Editor widget, go to the Style tab, and use the Alignment control. One of the icons is Justified.
Other builders, such as Divi and Beaver Builder, have a similar text alignment control in their text modules. The label and location vary, so look in the widget's style or design settings.
Remember that each builder's setting only affects its own widgets. Paragraphs created in the block editor still need one of the methods above.
Should you justify paragraphs on a website?
Usually not for body text: justified text on the web can leave uneven gaps between words, which makes reading harder, especially on phones.
Print layouts handle justified text with careful hyphenation and spacing. Web browsers do a simpler job, so narrow columns often end up with large rivers of white space running down the text.
Accessibility guidance agrees. The W3C's Understanding Visual Presentation page explains why text that is not justified is easier for many readers, including people with dyslexia.
If you still want justified text, a few things help:
- Turn on hyphenation. Add
hyphens: auto;to your rule so long words can break, as the MDN hyphens page describes. The page needs a correct language setting for this to work. - Keep it for desktop only. Wrap the rule in a media query such as
@media (min-width: 768px)so phones show left-aligned text. - Use it in wide blocks only, such as a pull quote or intro paragraph, rather than every line on the site.
Here is a mobile-friendly version of the site-wide rule:
@media (min-width: 768px) {
.entry-content p {
text-align: justify;
hyphens: auto;
}
}
Why is my justified text not working?
Justified text fails when the CSS is not loading, a more specific theme rule overrides it, a cache serves an old stylesheet, or the paragraph has only one line.
Check these points:
- Last lines are never stretched. The final line of a justified paragraph stays left-aligned. A one-line paragraph will look unchanged.
- Clear your caches. Clear your caching plugin, your CDN and your browser. Our guide on clearing cache in WordPress covers each layer.
- Check the class name. A typo such as
text-justfywill not match the CSS rule. - Check specificity. If the theme sets alignment with a stronger selector, make your selector more specific or add
!importantas a last resort. - Inspect the element. Right-click the paragraph, choose Inspect, and see which rule wins in the Styles panel. Chrome's guide to viewing and changing CSS in DevTools walks through this panel.
If paragraph gaps also look wrong after the change, our guide to WordPress paragraph spacing not working covers margins and line spacing.
Frequently asked questions
Why did WordPress remove the justify button?
WordPress 4.7 removed the justify button from the classic editor toolbar because justified text often reads poorly on screens and could be applied by accident. The keyboard shortcut stayed. The block editor never added a justify option to the core Paragraph block.
Will justified text hurt my SEO?
No. Search engines read the words, not their alignment. Text alignment is a visual choice. The only indirect effect is on readers, since hard-to-read text can make people leave sooner, which is a user experience issue rather than a ranking rule.
How do I justify text in a WordPress List block?
Add a class such as text-justify to the List block under Advanced, then write a CSS rule for that class that targets its list items. A rule like .text-justify li with text-align set to justify will stretch each item's lines.
Why is the last line of my justified paragraph not stretched?
That is normal browser behavior. Justified text leaves the final line of a paragraph aligned to the start so it does not stretch a few words across the full width. The text-align-last CSS property can change it, but most designers leave it alone.
Can I justify text on WordPress.com?
Yes. Adding an Additional CSS class works on any plan, but adding custom CSS on WordPress.com requires a plan that includes custom CSS. Check the current plan features on WordPress.com before relying on this method.
Sources
- text-align MDN Web Docs
- Justify for Paragraph Block WordPress.org Plugin Directory
- Keyboard Shortcuts (Classic Editor) WordPress.org
- Understanding Success Criterion 1.4.8: Visual Presentation W3C
- hyphens MDN Web Docs
Is your product missing, or something out of date?
Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.
Thanks — we review requests within 3 business days.
Related guides
About the editors
Researched from the primary sources listed above and checked against our editorial rules before publishing.


