# JLD/JLD2 and HDF5

**URL:** <https://discourse.julialang.org/t/jld-jld2-and-hdf5/38031>\
**Category:** New to Julia\
**Tags:** question, package\
**Created:** [April 22, 2020, 3:39pm UTC](https://discourse.julialang.org/t/jld-jld2-and-hdf5/38031 "2020-04-22T15:39:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![themadprogramer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/themadprogramer/32/14086_2.png) [@themadprogramer](https://discourse.julialang.org/u/themadprogramer)\
**Post date:** [April 22, 2020, 3:40pm UTC](https://discourse.julialang.org/t/jld-jld2-and-hdf5/38031/1 "2020-04-22T15:40:00Z")

</div>

Hello,

I noticed a few libraries were using the .jld2 extension which led me to discover [https://github.com/JuliaIO/JLD2.jl](https://github.com/JuliaIO/JLD2.jl) which seems to be a native Julia implementation of HDF5.

Now I just want to ask, are .h5 files encoded any different from .jdl2 files? Is changing the extension good enough to load, say a machine learning model ending in .h5, or do I have to convert it?

---

<div class="post-metadata">

**Author:** ![Pbellive](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pbellive/32/3604_2.png) [@Pbellive](https://discourse.julialang.org/u/Pbellive)\
**Post date:** [April 22, 2020, 5:24pm UTC](https://discourse.julialang.org/t/jld-jld2-and-hdf5/38031/2 "2020-04-22T17:24:24Z")

</div>

The short answer to your question is maybe. The JLD2 [readme](https://github.com/JuliaIO/JLD2.jl/blob/master/README.md) states

> other HDF5 implementations supporting HDF5 File Format Specification Version 3.0 (i.e. libhdf5 1.10 or later) should be able to read the files that JLD2 produces

but the package was not designed as a pure julia implementation of the HDF5 library and as far as I know, the compatibility of the files it produces with other HDF5 implementations has not been heavily tested.

So I would say, you can experiment with loading files produced by JLD2 using a non julia HDF5 implementation but if you need a strong guarantee that your files will be compatible, I would go with [HDF5.jl](https://github.com/JuliaIO/HDF5.jl), which just wraps the HDF5 c library.
