Easily Convert Pixels to EMs

Cost: Free
Found Via: http://pxtoem.com/

Do you hate having to pull out the calculator every time you want to convert pixels to ems? Sometimes, it’s quicker to simply use pixels because we simply don’t have the time to figure out the correct value. Luckily, an online service called pxtoem.com makes it laughably simple, and more importantly quick, to convert pixels to ems. All that you need to know is your base font size.

PX to EM conversion made simple.

Automatically Convert Pixels to EMs
  • Subscribe to the NETTUTS RSS Feed for more daily web development tuts and articles.


Add Comment

Discussion 27 Comments

  1. Nouman Saleem says:

    Maybe a little info on why select EM over px?

  2. Maybe because more people are starting to use it now … Web 2.0?

  3. Sprogz says:

    @Nouman: This info is available on the PXtoEM.com website. Click the tab labelled “3. Learn” for a little more info on font sizing.

  4. Los says:

    EM’s are so flexible where you can add .5em .8em etc. Compared to PX’s where you can only go from 5px to 6px and not 5.5px to 6px.

  5. Josso says:

    I’ll rather use this:
    #container {
    font-size:62.5%;
    }

    Then 1em = 10px and 2.4em = 24px :D

  6. roennow says:

    Think im gonna stick with the good old Em Calculator at http://riddle.pl/emcalc/

  7. James says:

    The advantages of using EMs over pixels are mostly accessibility related – if you use EMs then your users are able to re-size the text (this is only true for older browsers, as with newer browsers whole-page magnification is more popular). People should note that a user still has control over things like this, 10px doesn’t necessarily equal .675em … all we can make sure of, as web designers, is that all the different sizes on our sites are correct in their relativity to each other.

  8. Brian Cray says:

    If you go to the “Learn” tab, you’ll find all the info you need about EMs and why you should be using them going forward. :)

  9. xQlusive says:

    That can become very usefull! Thanx.

  10. This is going to be so useful, thanks so much!

  11. I like how the table also shows percentages and points.

  12. Brendan Saunders says:

    I am currently in the habit of setting the base-font size to 62.5% = 10px in the html, or body element. That way I can use EMs that make sense… Need 12px, 1.2em. 24px, 2.4em… easy peasy… I stole this technique from Elliot Jay Stocks’ Starkers reset-theme for WordPress.

    It also appears that Nettuts does the same… ;P

  13. sean turner says:

    Brilliant,

    Many thanks

  14. melodycf says:

    it’s useful,thanks!

  15. Simran says:

    I am always confused with em !!! i prefer to use pixels rather than em

  16. John says:

    Thanks for this useful tool.

  17. You know whats the worst thing in this beautiful world of Web 2.0 -> the spaghetti coded Internet Explorer! Sucks from right down to its grass roots when this over bloated company called MS decided to out run Netscape in the first place.
    Why don’t we all join hands and start a campaign against MS to forbid its spaghetti coded IE to be dragged out of this beautiful market of Web 2.0. And guess what they come up with their new campaign for IE8? Faster & Easier! why dont they say its buggier and more worst than any other browser in the world that exists in the market today?
    While on the other hand you have at least W3C compatible browsers like the Gems of the Web 2.0 like Mozilla Firefox, Opera and Safari!

    Well enough of this rant guys I pray that IE get eradicated with times as a web developer we all know how much of a big enemy this browser is for us!

  18. Themeheven says:

    That’s good it will help to the beginners . And thanks .

  19. kinki_2046 says:

    somebody give me an ideal for the usage of it.
    thanks

  20. Tushar says:

    Yup it is better to use

    #container {
    font-size:62.5%;
    }

    Then 1em = 10px and 2.4em = 24px

    I always use to.

  21. Ankit says:

    Very useful app specially the its percentage details.

Add a Comment

To add a code snippet to your comment, please wrap your code like so: <pre name="code" class="html">YOUR CODE</pre>. You can replace the class name with "js," "css," "sql," or "php." If there are any "<" or ">" within your code, please search and replace them with: &lt; and &gt; respectively.