toGeoJSON is a simple way to use KML and GPX formats with modern web tools like Leaflet and MapBox. It's simple, written in plain, dependency-free JavaScript and designed to work across browsers and in node.js.
Use this page to test it out, or download it to integrate into your application.