Something wrong with this tool?

About CSS LTR To RTL Online

This tool mirrors a left-to-right stylesheet into a right-to-left one. It swaps directional properties (margin-left ⇄ margin-right, padding, border, float, text-align), reorders four-value shorthands, mirrors border-radius corners, changes direction: ltr to rtl, and adds direction: rtl to body so the layout actually reads right-to-left.

Adding RTL support for Arabic, Hebrew, Persian, or Urdu by hand is tedious and error-prone — every left/right value has to be found and reversed. Paste your existing CSS here and get a correct mirrored copy in one step, ready to ship as a separate rtl.css. The conversion is textual and touches only your CSS; values inside url(), quoted strings, and transforms are left as-is, matching established flippers like CSSJanus.

How to use this tool

How to convert CSS from LTR to RTL

  1. Paste your CSS

    Copy your left-to-right stylesheet — a whole file or just a snippet — into the input box.

  2. Run the conversion

    Press Run. The tool swaps left/right properties and keywords, reorders four-value shorthands, mirrors border-radius corners, and changes direction: ltr to rtl.

  3. Review the output

    Check the result: margin-left became margin-right, float: left became float: right, and a direction: rtl rule was added to body.

  4. Copy or save

    Copy the converted CSS and save it as a separate rtl.css, or load it conditionally for [dir=rtl] / <html dir="rtl">.

  5. Test in the browser

    Switch your page to RTL and verify spacing, alignment, and icons. Adjust by hand any direction-sensitive values inside url() or transform, which are intentionally left untouched.