為了改善您的使用體驗,本網站正在進行維護,部分功能暫時無法使用。若本站的文件無法解決您的問題,想要向社群發問的話,請到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 發問,我們的社群成員將很快會回覆您的疑問。

搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

I accidentaly changed my json file to html. Now I can't import my bookmarks. How do I change it back or fix this?

  • 7 回覆
  • 5 有這個問題
  • 6 次檢視
  • 最近回覆由 abney1811

more options

I had to reformat my computer. When I backed up my bookmarks I accidentally changed the json file to html. Now I can't get it to load my bookmarks, and it won't import them. I need to fix this.

I had to reformat my computer. When I backed up my bookmarks I accidentally changed the json file to html. Now I can't get it to load my bookmarks, and it won't import them. I need to fix this.

所有回覆 (7)

more options

How did you change the file?

If you just renamed it, then renaming it back should work.

If you saved the bookmarks in HTML format, you can import that format.

  1. In the Bookmarks menu select "Show All Bookmarks" to open the bookmarks library
  2. In the bookmarks library select "Import & Backup", then "Import HTML" and follow the prompts to import from an HTML file
more options

I renamed it. I tried renaming it to bookmarks.json but it wouldn't let me change it. Keeps going back to html. I tried importing from html and I got no result. Nothing changed at all.

more options

Make sure that the backup file with the bookmarks has the correct file extension: .html for a HTML backup and .json for a JSON backup.
You can check that via the right-click context menu of that file and open the Properties.
If you are not sure about the file type then you can open the file in Firefox via "File > Open File"
A JSON backup will show as one long text line without line breaks and a HTML backup as a web page with clickable links.

  • A JSON backup starts with: {"title":"","id":1,"dateAdded":
  • An HTML backup starts with: <!DOCTYPE NETSCAPE-Bookmark-file-1>

You may need to add quotes ("") around the name to rename the file to the correct file extension.

more options

It's a JSON file. I couldn't just change the name back. So I copied everything into note tab light. Changed it to a json file, and when I tried to restore it said it couldn't process the file.

more options

Notepad may have added a hidden.txt file extension. You should see that if you open the Properties of that file via the right-click context menu.

Try to rename the file and add quotes around the name like I wrote above:

  • "bookmarks.json"
more options

Like I said above I already tried renaming it. With and without quotation marks. It did no good. I'm just going through the code now and copying my bookmarks over the hard way.

more options

Just figured out by accident how to change the .html file back to a .json file. Wherever the file is on your computer, open a CMD or DOS window up. If the file name is something like "bookmarks-2011-07-15.json.html" you can rename it using CMD, but it wont work in windows. Use these commands without the quotation marks.

"rename *.json.html *.json"

Their is one space between the l and *, "rename *.json.html(space)*.json"

That should effectively get rid of the .html at the end of the file. You should also see the file has the same icon it once had before having .html put on the end of it and it taking the icon of whatever web browser you are using. In Windows, not CMD, you might have to right click on the file and rename it again to get rid of the .json if it is showing, doing so wont affect the file anyway negatively. After it's renamed you can close the CMD window.

Now you should be able to import your bookmarks using the Firefox's "Imports and Backup > Restore > Choose File" menu and would you look at that, theirs your bookmarks.

Hope this helps even though it's now two plus months since first post.

由 abney1811 於 修改