SVG Vertical Text with writing-mode
writing-mode switches SVG text layout to a vertical direction, essential for East Asian typography and vertical diagram labels.
Drop your image here
Supports PNG, JPG, BMP, WEBP up to 5MB
Setting writing-mode for Vertical Layout
Setting writing-mode="vertical-rl" or "vertical-lr" on an SVG text element switches its layout direction so characters flow top-to-bottom instead of left-to-right, which is essential for correctly typesetting Japanese, Chinese, or Korean text in its traditional vertical orientation, and also useful for vertical axis labels in charts and diagrams.
- vertical-rl and vertical-lr switch text flow to a top-to-bottom direction
- Essential for correctly typesetting traditional East Asian vertical text
- Also useful for vertical axis labels in charts, diagrams, and infographics
Combining writing-mode with Other Text Properties
When using vertical writing modes, related properties like text-orientation control whether individual characters themselves rotate or stay upright within the vertical flow, which matters differently for logographic characters (which typically stay upright) versus Latin script mixed into vertical East Asian text (which often needs rotation).
- text-orientation controls whether individual characters rotate or stay upright
- Logographic characters typically remain upright within vertical text flow
- Latin script mixed into vertical text often needs rotation for proper reading
Frequently Asked Questions
Does writing-mode work the same in SVG as it does in CSS for HTML?
The concept and property values are shared between CSS and SVG, since SVG2 aligned its text layout properties with CSS, though it's worth checking specific browser support for the exact combination of properties used.
Can I mix horizontal and vertical text within the same SVG diagram?
Yes, writing-mode is set per text element, so a diagram can freely mix horizontally oriented labels with vertically oriented ones as needed for different parts of the layout.
Related guides
Ready to Convert Your Image to SVG?
Free online converter — no sign-up, no watermarks, results in under 3 seconds.
Try It Free — Convert Image to SVG