# is there a way to convert gmsh file(.msh) to .vtk

**URL:** https://discourse.vtk.org/t/is-there-a-way-to-convert-gmsh-file-msh-to-vtk/9391
**Category:** Support
**Tags:** file-formats
**Created:** [September 19, 2022, 3:05am UTC](https://discourse.vtk.org/t/is-there-a-way-to-convert-gmsh-file-msh-to-vtk/9391 "2022-09-19T03:05:46Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Zhao412](https://discourse.vtk.org/user_avatar/discourse.vtk.org/zhao412/32/5670_2.png) [@Zhao412](https://discourse.vtk.org/u/Zhao412)
#### Post date: [September 19, 2022, 3:05am UTC](https://discourse.vtk.org/t/is-there-a-way-to-convert-gmsh-file-msh-to-vtk/9391/1 "2022-09-19T03:05:46Z")

</div>

is there a way to convert gmsh file(.msh) to .vtk  
or could i use gmsh output a vtk file,  
like

```auto
write("test.vtk");

```

Or I have to write a c++program to convert the msh file into a vtk file

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mwestphal/32/19_2.png) [@mwestphal](https://discourse.vtk.org/u/mwestphal)
#### Post date: [September 19, 2022, 3:07am UTC](https://discourse.vtk.org/t/is-there-a-way-to-convert-gmsh-file-msh-to-vtk/9391/2 "2022-09-19T03:07:59Z")

</div>

ParaView has a Gmsh reader plugin, so you could use that, directly in ParaView GUI, or with a pvpython script, or by recovering the vtkGmshReader source from ParaView and use them in a custom C++ app.
