DEVELOPER TOOL

RTL/LTR Converter

Convert CSS and HTML between LTR and RTL in one click. Flip directional properties and Tailwind classes, optionally set dir attribute.

styles.css
.card {
  margin-left: 16px;
  padding-right: 12px;
  text-align: left;
}

                    
converted.css
.card {
  margin-right: 16px;
  padding-left: 12px;
  text-align: right;
}

                    
KEY FEATURES

Core Capabilities

Flip directional CSS properties and Tailwind utilities. Optionally set dir attribute for HTML documents.

CSS Flipping

Margin/Padding/Border left↔right, text-align, float/clear, position left/right, direction

Tailwind Mirroring

Flip common directional utilities like ml/mr, pl/pr, border-l/r, rounded-l/r, text-left/right

HTML Direction

Set documentdir="rtl"attribute and convert inline styles and legacy align attributes

Ready to Convert?

Jump into the dashboard and convert your CSS/HTML now.

Open Dashboard

Convert LTR Markup to RTL Without Rewriting by Hand

Supporting right-to-left languages (Arabic, Hebrew, Persian, Urdu) is a common requirement for any product that goes international, but the CSS is counterintuitive: left and right flip, text-align flips, but margin and padding do not, and logical properties (inset-inline-start) replace physical ones. Hand-converting a stylesheet is slow and invites subtle bugs. This converter takes your CSS and produces a correct RTL variant automatically.

It maps physical properties to their logical equivalents, flips directional properties where required, and leaves non-directional ones untouched - which is the part that trips up manual conversions. The output is a clean CSS block you can load with a dir=rtl media query or a separate stylesheet, so the same markup serves both LTR and RTL users.

Logical properties vs physical properties

Modern CSS has logical properties (margin-inline-start, inset-block-end) that are direction-aware by definition - they flip automatically between LTR and RTL. Wherever the converter can replace a physical property (margin-left) with its logical equivalent (margin-inline-start), it does, because that is the most maintainable output. Where no logical equivalent exists, it produces the explicit flipped value.

Common Questions

What languages does RTL support cover?
All right-to-left scripts - Arabic, Hebrew, Persian, Urdu and others. The conversion is about the text direction, so any RTL language is covered.
Does it flip everything?
No - and that is the point. It flips directional properties (left/right, text-align) and maps physical properties to logical ones where possible, while leaving non-directional properties (margin-top, width) untouched. That selectivity is what manual conversions get wrong.
How do I serve the result?
Load the generated CSS with a dir=rtl attribute on the document, or as a separate stylesheet. The markup stays identical; only the CSS changes direction.
What are logical properties?
CSS properties like margin-inline-start and inset-block-end that are direction-aware - they automatically mean left in LTR and right in RTL. The converter prefers these because they make the result maintainable.
Does my markup need to change too?
No. The conversion is CSS-only. The same HTML works for both directions; the CSS handles the flip.