# Converting .vtk to .vtu files

**URL:** https://discourse.paraview.org/t/converting-vtk-to-vtu-files/2317
**Category:** ParaView Support
**Created:** [July 29, 2019, 7:28pm UTC](https://discourse.paraview.org/t/converting-vtk-to-vtu-files/2317 "2019-07-29T19:28:19Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Raychel\_Bahnick](https://discourse.paraview.org/user_avatar/discourse.paraview.org/raychel_bahnick/32/1689_2.png) [@Raychel\_Bahnick](https://discourse.paraview.org/u/Raychel_Bahnick)
#### Post date: [July 29, 2019, 7:28pm UTC](https://discourse.paraview.org/t/converting-vtk-to-vtu-files/2317/1 "2019-07-29T19:28:19Z")

</div>

I have all of my current files in .vtk format with a rectilinear grid. Is there an easy way to convert each of these files into .vtu files?

Thank you

---

<div class="post-metadata">

### Author: ![Dave\_DeMarle](https://discourse.paraview.org/user_avatar/discourse.paraview.org/dave_demarle/32/27_2.png) [@Dave\_DeMarle](https://discourse.paraview.org/u/Dave_DeMarle)
#### Post date: [July 30, 2019, 2:34pm UTC](https://discourse.paraview.org/t/converting-vtk-to-vtu-files/2317/2 "2019-07-30T14:34:40Z")

</div>

I recommend a small python script that opens the vtk file attaches it to a vtu writer and executes it. To try it quickly, turn on Tools-\>Python Trace, open a vtk file, do File-\>Save Data to vtu, and then Tools-\>Stop Trace. You can save and edit that script and then run it from the command line with pvpython or from within the GUI vi View-\>Python Shell-\>Run Script.
