✳tools.stBrowse tools
◈ Processed on your device
{ }

Language and direction tags

Generate valid language and text-direction attributes.

Free

Generate valid language and text-direction attributes. Validate a BCP 47 locale and produce escaped lang and dir attributes for an HTML element. Auto direction uses the base language against a small right-to-left language list.

◈ Local processingFree

How to use

  1. Enter your text, values, or image.
  2. Adjust the options and run the tool.
  3. Copy or download your result.

Worked example

Example input

BCP 47 language tag: ar
Text direction: auto

Example result

lang="ar" dir="rtl"

Limitations and details

Automatic direction is language-based, not content analysis; mixed-direction text may need additional bidirectional markup.

Inputs and options

BCP 47 language tag
Text
Text direction
Auto / Left to right / Right to left

Frequently asked questions

Is this tool free and private?

Yes. All 300 tools are free in this phase. Processing happens in your browser; your input and files are not sent to our servers.

Related tools