{ CSS Writing Mode Previewer }

// visualize writing-mode · direction · text-orientation live

Preview CSS writing-mode, direction, and text-orientation live. Visualize how vertical, horizontal, and RTL text layouts render across different CSS modes instantly.

Try multilingual, RTL Arabic, or CJK characters to see text-orientation in action.
// GENERATED CSS

        
// LIVE PREVIEW
inline axis →
block axis ↓

Text flows left-to-right, blocks stack top-to-bottom.

// ALL WRITING MODES — COMPARE AT A GLANCE

HOW TO USE

  1. 01
    Pick a Writing Mode

    Click any writing-mode value to instantly see how your text orientation changes in the live preview.

  2. 02
    Adjust Direction & Orientation

    Toggle between ltr/rtl and mixed/upright/sideways to fine-tune rendering, especially for CJK or Arabic text.

  3. 03
    Copy Generated CSS

    Click "Copy" to grab the ready-to-use CSS snippet for your project.

FEATURES

5 Writing Modes RTL Support CJK Text Axis Diagram Matrix View CSS Export

USE CASES

  • 🔧 Building vertical text navigation for Japanese sites
  • 🔧 Designing RTL layouts for Arabic/Hebrew content
  • 🔧 Creating rotated labels on chart axes
  • 🔧 Styling sideways headings on cards or banners

WHAT IS THIS?

The CSS writing-mode property controls whether text flows horizontally or vertically, and the direction of block progression. Combined with direction and text-orientation, it enables full internationalization support for vertical CJK scripts and right-to-left languages.

RELATED TOOLS

FREQUENTLY ASKED QUESTIONS

What is CSS writing-mode?

The writing-mode CSS property sets whether lines of text are laid out horizontally or vertically, and the direction in which blocks progress. Values include horizontal-tb (default), vertical-rl, vertical-lr, sideways-rl, and sideways-lr.

What is the difference between vertical-rl and vertical-lr?

vertical-rl flows text from right to left (blocks stack right-to-left), while vertical-lr flows blocks from left to right. Both write characters vertically, top-to-bottom. Japanese vertical text traditionally uses vertical-rl.

How does text-orientation affect CJK characters?

With text-orientation: mixed (default), CJK characters are displayed upright while Latin characters are rotated 90°. With upright, all characters including Latin are displayed upright. With sideways, all characters are rotated, as in horizontal writing.

What does the direction property do?

The direction CSS property sets the base text direction to left-to-right (ltr) or right-to-left (rtl). It affects how inline content flows within a line and the order of columns in a table. It pairs with writing-mode for full i18n control.

What are sideways-rl and sideways-lr?

sideways-rl lays out content vertically, with all characters—including Latin—rotated 90° clockwise. sideways-lr rotates content counterclockwise. These are useful for decorative rotated text or sidebar labels where you want consistent character rotation.

Does writing-mode affect logical CSS properties?

Yes! When you change writing-mode, logical properties like margin-inline-start, padding-block, and border-inline-end automatically adapt to the new writing direction—making them essential for internationalized layouts.

What is CSS Writing Mode and Why Does It Matter?

CSS writing-mode is one of the most powerful yet underutilized properties in the CSS specification. It controls the fundamental flow of text and block elements on a page — whether content runs horizontally from left to right (as in English), vertically from top to bottom (as in traditional Japanese or Chinese), or in any other direction supported by international writing systems.

Understanding writing-mode is essential for developers building multilingual websites, internationalized applications, or creative typographic layouts. This CSS Writing Mode Previewer lets you see the effect of every value instantly, without writing a single line of code yourself.

💡 Looking for premium CSS templates and UI kits? MonsterONE offers unlimited downloads of templates, UI kits, and design assets — worth checking out for your next internationalized project.

The Five CSS writing-mode Values Explained

The writing-mode property accepts five values, each producing a distinct text layout:

Understanding direction: ltr and rtl

The direction CSS property complements writing-mode by controlling inline text direction within a line. ltr (left-to-right) is the default for Western scripts, while rtl (right-to-left) is essential for Arabic, Hebrew, Persian, and Urdu text.

When combined with writing-mode: horizontal-tb, direction: rtl makes the entire page layout mirror-image — the first line of a paragraph starts on the right, navigation items align to the right, and flex containers reverse their default order. This is the foundation of proper RTL web design.

text-orientation: How Characters Rotate in Vertical Text

When using a vertical writing mode, the text-orientation property controls how individual characters are displayed:

The Inline Axis vs. Block Axis

A key concept for understanding writing modes is the difference between the inline axis and the block axis. In horizontal-tb (default), the inline axis runs horizontally (left-right) and the block axis runs vertically (top-bottom). When you switch to vertical-rl, these axes swap: the inline axis now runs vertically and the block axis runs horizontally.

This is why CSS logical properties exist. Instead of margin-left and margin-right, you can write margin-inline-start and margin-inline-end. These automatically adapt to whichever writing mode is active, making your CSS truly direction-agnostic.

Practical Use Cases for writing-mode

Writing modes aren't just for international typography — they enable many creative and practical design patterns:

writing-mode vs. CSS transform: rotate()

A common mistake is using transform: rotate(90deg) to create vertical text instead of writing-mode. While both visually rotate text, they are fundamentally different. transform: rotate() is purely visual — the element still occupies its original space in the document flow, causing layout overlap. writing-mode, on the other hand, changes the actual document flow. The element's dimensions, margins, padding, and alignment all adapt to the new writing direction, producing correct, accessible layout behavior.

Browser Support for CSS Writing Mode

CSS writing-mode enjoys excellent modern browser support, with all major browsers supporting it. The core values (horizontal-tb, vertical-rl, vertical-lr) are well-supported even in older browsers. The newer sideways-rl and sideways-lr values have slightly less legacy support but work in all modern browsers from around 2017 onward. For production use, include feature queries (@supports) when targeting very old browsers.