What is CSS Logical Properties Converter?
CSS logical properties use writing-mode-relative directions instead of physical directions. Inline (text flow direction) and Block (perpendicular direction) replace Left, Right, Top, and Bottom. This means the same CSS works for left-to-right, right-to-left, and vertical languages without overrides. For example, margin-inline-start applies to the left side in LTR and the right side in RTL.
quickAnswer
Convert physical CSS properties such as margin-left and padding-right into writing-mode-aware logical equivalents. This helps layouts adapt automatically to right-to-left and vertical writing modes without separate overrides.
Last updated: 2026-06-11
limitations
- Some shorthand logical properties such as border-inline, border-block, and inset-inline have spotty browser support compared to the core longhand logical properties.
- The converter handles single property conversion. Migrating a large stylesheet to logical properties requires updating each physical-to-logical pair and verifying no mixed-direction edge cases remain.
- Logical properties map to physical properties based on the writing-mode and direction of the element. A single inline-start maps to left in LTR and right in RTL. This means the generated code behaves differently depending on the document language direction, which requires testing in both LTR and RTL modes.
Sources:MDN Web Docs · W3C Specifications · jquery.app on GitHub
How to use this tool
- Choose the physical CSS property you want to convert, such as margin-left or padding-right.
- Select the logical equivalent from the available suggestions.
- Enter the value for the property.
- Copy the logical property declaration into your stylesheet and test in both LTR and RTL directions.
What you can use it for
- Prepare CSS that works for multilingual websites with RTL language support.
- Write direction-agnostic component styles that do not need separate RTL overrides.
- Reduce the need for a separate RTL stylesheet by using logical properties from the start.