Ctrl + K
HomeCSS ToolsCSS Line Height Generator
Free Developer Tool

CSS Line Height Generator

Generate CSS line-height values and preview how different line spacing settings affect text.

1.5
16px

CSS line-height controls the amount of vertical space between lines of text. Adjust the value to see how different line heights affect readability.

What is CSS Line Height Generator?

Generate CSS line-height values for controlling the vertical spacing between lines of text and preview the resulting typography before using it in a stylesheet.

How to use

  1. Enter or select a line-height value.
  2. Choose the appropriate unit or unitless value.
  3. Preview the text spacing.
  4. Copy the generated CSS.

Features

  • Line-height generation
  • Unitless values
  • CSS length units
  • Live text preview
  • CSS output

Common Use Cases

  • Typography design
  • Paragraph styling
  • Heading spacing
  • UI text
  • Responsive layouts

Example

Input
1.5
Output
line-height: 1.5;

FAQ

Can line-height be unitless?

Yes.

Can pixel values be used?

Yes.

Does the tool preview the result?

Yes.