In Bootstrap 3 and Bootstrap 4 you can use the following:

<p class="text-justify">Justified text.</p>

Official documentation

(Update) This feature removed from Bootstrap 5

  • Commit
  • Official document and recommendation

Note that we don't provide utility classes for justified text. While, aesthetically, justified text might look more appealing, it does make word-spacing more random and therefore harder to read.

Based on the official UX suggestion: don't use justified text! ;)

Answer from Zoltan on Stack Overflow
🌐
Bootstrap
getbootstrap.com › docs › 4.0 › utilities › flex
Flex · Bootstrap
Use justify-content utilities on flexbox containers to change the alignment of flex items on the main axis (the x-axis to start, y-axis if flex-direction: column).
🌐
Bootstrap
getbootstrap.com › docs › 5.3 › utilities › flex
Flex · Bootstrap v5.3
Use justify-content utilities on flexbox containers to change the alignment of flex items on the main axis (the x-axis to start, y-axis if flex-direction: column).
🌐
Bootstrap Shuffle
bootstrapshuffle.com › classes › flexbox › justify-content-*-center
justify-content-*-center - Bootstrap CSS class
<div class="d-flex justify-content-center"> <div class="p-2">Flex item 1</div> <div class="p-2">Flex item 2</div> <div class="p-2">Flex item 3</div> </div> <!-- responsive variations --> <div class="d-flex justify-content-sm-center">...</div> <div class="d-flex justify-content-md-center">...</div> <div class="d-flex justify-content-lg-center">...</div> <div class="d-flex justify-content-xl-center">...</div>Copy code ... You don't need to remember all CSS classes. Just use the Bootstrap Editor instead.
🌐
GeeksforGeeks
geeksforgeeks.org › bootstrap › bootstrap-5-flex-justify-content
Bootstrap 5 Flex Justify Content - GeeksforGeeks
April 10, 2024 - Bootstrap 5 Flex Justify Content aligns items along the main axis, distributing space between or around them, facilitating flexible layouts and responsive design with various alignment options.
🌐
Bootstrap
getbootstrap.com › docs › 5.0 › utilities › flex
Flex · Bootstrap v5.0
Use justify-content utilities on flexbox containers to change the alignment of flex items on the main axis (the x-axis to start, y-axis if flex-direction: column).
🌐
Bootstrap
getbootstrap.com › docs › 5.3 › layout › columns
Columns · Bootstrap v5.3
<div class="container text-center"> <div class="row justify-content-start"> <div class="col-4"> One of two columns </div> <div class="col-4"> One of two columns </div> </div> <div class="row justify-content-center"> <div class="col-4"> One of two columns </div> <div class="col-4"> One of two columns </div> </div> <div class="row justify-content-end"> <div class="col-4"> One of two columns </div> <div class="col-4"> One of two columns </div> </div> <div class="row justify-content-around"> <div class="col-4"> One of two columns </div> <div class="col-4"> One of two columns </div> </div> <div class="row justify-content-between"> <div class="col-4"> One of two columns </div> <div class="col-4"> One of two columns </div> </div> <div class="row justify-content-evenly"> <div class="col-4"> One of two columns </div> <div class="col-4"> One of two columns </div> </div> </div>
🌐
Bootstrap
getbootstrap.com › docs › 5.3 › utilities › text
Text · Bootstrap v5.3
Note that we don’t provide utility classes for justified text.
Find elsewhere
🌐
W3Schools
w3schools.com › bootstrap4 › bootstrap_flex.asp
Bootstrap 4 Flex
Use the .justify-content-* classes to change the alignment of flex items.
🌐
W3Schools
w3schools.com › bootstrap5 › bootstrap_flex.php
Bootstrap 5 Flex
Use the .justify-content-* classes to change the alignment of flex items.
🌐
Bootstrap
getbootstrap.com › docs › 5.0 › layout › columns
Columns · Bootstrap v5.0
<div class="container"> <div class="row justify-content-start"> <div class="col-4"> One of two columns </div> <div class="col-4"> One of two columns </div> </div> <div class="row justify-content-center"> <div class="col-4"> One of two columns </div> <div class="col-4"> One of two columns </div> </div> <div class="row justify-content-end"> <div class="col-4"> One of two columns </div> <div class="col-4"> One of two columns </div> </div> <div class="row justify-content-around"> <div class="col-4"> One of two columns </div> <div class="col-4"> One of two columns </div> </div> <div class="row justify-content-between"> <div class="col-4"> One of two columns </div> <div class="col-4"> One of two columns </div> </div> <div class="row justify-content-evenly"> <div class="col-4"> One of two columns </div> <div class="col-4"> One of two columns </div> </div> </div>
🌐
FastBootstrap
fastbootstrap.com › docs › justify-content
Bootstrap Justify Content CSS - FastBootstrap
Use justify-content utilities on flexbox containers to change the alignment of flex items on the main axis (the x-axis to start, y-axis if flex-direction: column).
🌐
Shuffle
shuffle.dev › bootstrap › classes › flexbox › justify-content-*-between
Bootstrap CSS class: justify-content-*-between
<div class="d-flex justify-content-between"> <div class="p-2">Flex item 1</div> <div class="p-2">Flex item 2</div> <div class="p-2">Flex item 3</div> </div> <!-- responsive variations --> <div class="d-flex justify-content-sm-between">...</div> <div class="d-flex justify-content-md-between">...</div> <div class="d-flex justify-content-lg-between">...</div> <div class="d-flex justify-content-xl-between">...</div>
🌐
Zero To Mastery
zerotomastery.io › blog › bootstrap-flexbox
Beginners Guide To Flexbox With Bootstrap | Zero To Mastery
Flexbox with Bootstrap also gives you the ability to easily align items in the center, both horizontally and vertically. ... To center align your items both horizontally and vertically, you would use justify-content-center (like we did before) along with the align-items-center classes:
🌐
Bootstrap Shuffle
bootstrapshuffle.com › classes › flexbox › justify-content-*-end
justify-content-*-end - Bootstrap CSS class
<div class="d-flex justify-content-end"> <div class="p-2">Flex item 1</div> <div class="p-2">Flex item 2</div> <div class="p-2">Flex item 3</div> </div> <!-- responsive variations --> <div class="d-flex justify-content-sm-end">...</div> <div class="d-flex justify-content-md-end">...</div> <div class="d-flex justify-content-lg-end">...</div> <div class="d-flex justify-content-xl-end">...</div>Copy code ... You don't need to remember all CSS classes. Just use the Bootstrap Editor instead.
🌐
Webpixels
docs.webpixels.io › css › justify-content
Justify Content - Bootstrap 5
Quickly manage the layout, alignment, and sizing of grid columns, navigation, components, and more with a full suite of responsive flexbox utilities.
🌐
Bootstrap
getbootstrap.com › docs › 5.3 › layout › grid
Grid system · Bootstrap v5.3
<div class="container text-center"> <div class="row justify-content-md-center"> <div class="col col-lg-2"> 1 of 3 </div> <div class="col-md-auto"> Variable width content </div> <div class="col col-lg-2"> 3 of 3 </div> </div> <div class="row"> <div class="col"> 1 of 3 </div> <div class="col-md-auto"> Variable width content </div> <div class="col col-lg-2"> 3 of 3 </div> </div> </div> Bootstrap’s grid includes six tiers of predefined classes for building complex responsive layouts.
🌐
W3Schools
w3schools.com › bootstrap4 › tryit.asp
Justify content center
The W3Schools online code editor allows you to edit code and view the result in your browser
🌐
Bootstrap
getbootstrap.com › docs › 4.0 › layout › grid
Grid system · Bootstrap
Use col-{breakpoint}-auto classes to size columns based on the natural width of their content. ... <div class="container"> <div class="row justify-content-md-center"> <div class="col col-lg-2"> 1 of 3 </div> <div class="col-md-auto"> Variable ...
🌐
Bootstrap Shuffle
bootstrapshuffle.com › classes › flexbox › align-items-*-center
align-items-*-center - Bootstrap CSS class
Just use the Bootstrap Editor instead. flex-*-nowrap · flex-*-column · flex-*-row · flex-*-row-reverse · flex-*-column-reverse · flex-*-wrap-reverse · flex-*-grow-1 · flex-*-grow-0 · flex-*-shrink-1 · flex-*-shrink-0 · flex-*-wrap · justify-content-*-start ·