4

This question already has an answer here:

I have a large file of plain text on Mac OSX that contains many http(s) URLs.
For example:

blah blah https://www.stackexchange.com
blah https://www.stackoverflow.com blah blah
https://www.google.com blah

What's the easiest way to view that text in a way that I can click on each link and open it in a web browser?

I would prefer a solution that doesn't require uploading the text file to the Internet.

marked as duplicate by Allan, Ɱark Ƭ, bmike macos May 19 '17 at 1:59

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Drag the text file to a browser. highlight and/or copy the link, drag to tab bar or url pane or copy to url pane. Firefox, Safari and Chrome are particularly friendly. Opera a bit more stodgy. – user90735 May 17 '17 at 23:22
4

You can also automatically change all of your links that appear as text into actual clickable hyperlinks

enter image description hereenter image description here

  • 2
    That only persists until you close the plain text file. Next time you open it you'd have to do the same thing. Even saving it afterward doesn't maintain the links in a plain text file. – user3439894 May 17 '17 at 21:42
4

Actually, there is an Open URL service pre-installed on macOS.

Select the entire text of the document +A and secondary click [Right click, or control click], then select Open URL from the drop-down. The url(s) will open in the default browser.

If you do this every day, set a keyboard shortcut in System Preferences (See last image)

Open URL

This is what happens:

Tabs opened in default browser

System preferences open url shortcut

0

As a plain text file, if you open it in TextEdit you can right-click (control-click) on a URL, and select
Open URL, from the context menu.

enter image description here

  • Should we delete this answer? It is similar to this other answer, but even though this one is older, that one is higher quality. I propose we scrap this answer in favor of the newer and improved answer, although it'd be nice if that person just edited this answer. – haykam May 18 '17 at 22:22
  • @haykam, I was the first to post an answer to the question and I'm not going to delete it as it's a valid answer and has an up-vote. – user3439894 May 18 '17 at 22:25
  • @haykam, Even though you just down-voted it, I'm not going to delete it! – user3439894 May 18 '17 at 22:35
  • Even if you don't delete this answer, the other answer will probably be accepted because it is better. – haykam May 18 '17 at 22:36
  • No, I did not just downvote it. Please do not assume I did that. Downvotes are for answers that are unhelpful. This answer may not be the best, but it still is useful. – haykam May 18 '17 at 22:36
0

This is the quickest and easiest way I can think of...

  1. Open Mail.app
  2. Copy and paste the text into a new email
  3. Close the compose window, and save the email as a draft when prompted
  4. Select the email in the Drafts folder. In the preview pane, hyperlinks in the text will be clickable.

(Caveat: if your email account is set to store Drafts on your mail server rather than locally, then this will technically "upload the text to the internet", which you didn't want to do.)

Not the answer you're looking for? Browse other questions tagged .