PX to PT Converter

Convert between pixels (PX) and points (PT) units with custom DPI settings

PX → PT

Conversion Formula

PX → PT: pt = px × 72 ÷ DPI

PT → PX: px = pt × DPI ÷ 72

Current DPI: 96 DPI

Common Conversion Table

PXPT (72 DPI)PT (96 DPI)PT (150 DPI)PT (300 DPI)
12px12.00pt9.00pt5.76pt2.88pt
14px14.00pt10.50pt6.72pt3.36pt
16px16.00pt12.00pt7.68pt3.84pt
18px18.00pt13.50pt8.64pt4.32pt
20px20.00pt15.00pt9.60pt4.80pt
24px24.00pt18.00pt11.52pt5.76pt
28px28.00pt21.00pt13.44pt6.72pt
32px32.00pt24.00pt15.36pt7.68pt
36px36.00pt27.00pt17.28pt8.64pt
48px48.00pt36.00pt23.04pt11.52pt

Tool Overview: PX to PT Converter

The PX to PT Converter is a professional tool for converting between pixels (PX) and points (PT) units, supporting custom DPI settings for web design, print design, UI design, and various other scenarios.

What Is PX to PT Converter?

PX to PT Converter converts PX to PT and produces output ready to use.

How to Use

  1. Paste PX content or enter parameters.
  2. Choose PT output and set options.
  3. Review the result and copy or download.

Common Use Cases

  • PX↔PT format migration
  • Use PX data in PT workflows or code generation
  • Validate conversion results against specs

❓ FAQ

Q1: Conversion failed or empty?
A: Check that the PX input is valid and complete.

Q2: Output looks different?
A: Formatting may change to match PT rules.

Q3: How to batch process?
A: Process in smaller chunks for stability.

✨ Key Features

  • 🔄 Bidirectional Conversion: Supports both PX to PT and PT to PX conversion
  • 🎛️ DPI Settings: Supports common DPI values (72, 96, 150, 300) and custom DPI
  • 📊 Real-time Calculation: Displays conversion results instantly upon input
  • 📋 One-click Copy: Quick copy of conversion results with unit suffixes
  • 🔄 Value Swap: One-click swap between PX and PT values
  • 📈 Conversion Table: Provides conversion reference table for common values
  • 📐 Formula Explanation: Shows conversion formulas and current DPI settings

📖 Conversion Formulas

PX to PT

PT = PX × 72 ÷ DPI

PT to PX

PX = PT × DPI ÷ 72

Where:

  • PX: Pixel unit, basic unit for screen display
  • PT: Point unit, standard unit in printing industry
  • DPI: Dots Per Inch

🎯 Use Cases

1. Web Design

Converting PT units from design mockups to PX units for CSS in responsive design:

/* Design mockup font size: 12pt */
/* Convert to PX at 96 DPI */
font-size: 16px; /* 12pt × 96 ÷ 72 = 16px */

/* Design mockup line height: 18pt */
line-height: 24px; /* 18pt × 96 ÷ 72 = 24px */

2. Print Design

Converting web PX units to print PT units:

/* Web title: 24px */
/* Convert to 300 DPI print unit */
/* 24px × 72 ÷ 300 = 5.76pt */

/* Web body text: 16px */
/* Convert to 300 DPI print unit */
/* 16px × 72 ÷ 300 = 3.84pt */

3. UI Design System

Establishing unified design specifications:

// Font size conversion in design system
const fontSizes = {
  // Based on 12pt base font, 96 DPI
  small: '12px',    // 9pt
  base: '16px',     // 12pt
  large: '20px',    // 15pt
  xlarge: '24px',   // 18pt
  xxlarge: '32px'   // 24pt
}

// DPI conversion functions
function ptToPx(pt, dpi = 96) {
  return Math.round(pt * dpi / 72)
}

function pxToPt(px, dpi = 96) {
  return Math.round(px * 72 / dpi * 100) / 100
}

📱 Common DPI Explanations

72 DPI

  • Usage: Traditional Mac monitor standard
  • Feature: 1pt = 1px, simplest conversion
  • Application: Early Mac design, PDF documents

96 DPI

  • Usage: Windows system default DPI
  • Feature: Modern web development standard
  • Application: Web design, Windows applications

150 DPI

  • Usage: High-resolution displays
  • Feature: 1.5x scaling ratio
  • Application: HD monitors, mobile devices

300 DPI

  • Usage: Printing industry standard
  • Feature: High-quality print output
  • Application: Books, magazines, poster printing

🔧 Practical Application Examples

Responsive Font Design

/* Base font system */
:root {
  /* Based on 16px = 12pt (96 DPI) */
  --font-size-xs: 12px;   /* 9pt */
  --font-size-sm: 14px;   /* 10.5pt */
  --font-size-base: 16px; /* 12pt */
  --font-size-lg: 18px;   /* 13.5pt */
  --font-size-xl: 20px;   /* 15pt */
  --font-size-2xl: 24px;  /* 18pt */
  --font-size-3xl: 30px;  /* 22.5pt */
}

/* Print styles */
@media print {
  :root {
    /* Convert to 300 DPI print units */
    --font-size-xs: 2.88pt;   /* 12px */
    --font-size-sm: 3.36pt;   /* 14px */
    --font-size-base: 3.84pt; /* 16px */
    --font-size-lg: 4.32pt;   /* 18px */
    --font-size-xl: 4.8pt;    /* 20px */
    --font-size-2xl: 5.76pt;  /* 24px */
    --font-size-3xl: 7.2pt;   /* 30px */
  }
}

Design Mockup Conversion Tool

class DesignConverter {
  constructor(designDPI = 72, targetDPI = 96) {
    this.designDPI = designDPI
    this.targetDPI = targetDPI
  }

  // Design PT to development PX
  ptToPx(pt) {
    return Math.round(pt * this.targetDPI / 72)
  }

  // Development PX to design PT
  pxToPt(px) {
    return Math.round(px * 72 / this.targetDPI * 100) / 100
  }

  // Batch convert design specifications
  convertDesignSpec(spec) {
    const converted = {}
    for (const [key, value] of Object.entries(spec)) {
      if (typeof value === 'number') {
        converted[key] = this.ptToPx(value)
      } else if (typeof value === 'object') {
        converted[key] = this.convertDesignSpec(value)
      } else {
        converted[key] = value
      }
    }
    return converted
  }
}

// Usage example
const converter = new DesignConverter(72, 96)

const designSpec = {
  typography: {
    h1: 24,      // 24pt
    h2: 20,      // 20pt
    body: 14,    // 14pt
    caption: 12  // 12pt
  },
  spacing: {
    xs: 4,       // 4pt
    sm: 8,       // 8pt
    md: 16,      // 16pt
    lg: 24,      // 24pt
    xl: 32       // 32pt
  }
}

const cssSpec = converter.convertDesignSpec(designSpec)
console.log(cssSpec)
// Output:
// {
//   typography: { h1: 32, h2: 27, body: 19, caption: 16 },
//   spacing: { xs: 5, sm: 11, md: 21, lg: 32, xl: 43 }
// }

💡 Usage Tips

1. Precise Conversion

  • Use 4 decimal places precision for accurate conversion
  • Consider rounding effects on visual appearance
  • Manually fine-tune critical dimensions

2. Design Consistency

  • Establish base unit system (e.g., 8px grid)
  • Use multiplier relationships to maintain proportional harmony
  • Test visual effects across different DPIs

3. Performance Optimization

  • Pre-calculate common conversion values
  • Use CSS variables to manage dimensions uniformly
  • Avoid frequent runtime calculations

⚠️ Important Notes

  1. DPI Selection: Choose the correct DPI value based on target platform
  2. Precision Handling: Be aware of visual differences caused by floating-point precision
  3. Compatibility: Different browsers may handle sub-pixel values differently
  4. User Experience: Ensure converted dimensions display properly on target devices

🔗 Related Tools

  • CSS Unit Converter: Supports conversion of em, rem, vh, vw and other units
  • Responsive Design Tools: Help design multi-screen adaptation solutions
  • Font Size Calculator: Calculate optimal font size and line height ratios
  • Grid System Generator: Create pixel-based grid systems

With the PX to PT Converter, you can easily handle unit conversion needs across different design environments, ensuring design consistency and accuracy.